package com.example.jdk8.person;

public class TestPerson {
    public static void main(String[] args) {
        PersonFactory<Person> personFactory = Person::new;
        Person person = personFactory.create("PG", "one");
        System.out.println(person.getFirstName() + "----->" + person.getSecondName());
        person = personFactory.create("li", "小鹿");
        System.out.println(person.getFirstName() + "----->" + person.getSecondName());
        person.setFirstName("文");
        person.setSecondName("章");
        System.out.println(person.getFirstName() + "----->" + person.getSecondName());
    }
}
